package com.example.graduation.service;

import com.example.graduation.util.R;
import com.example.graduation.form.FileDForm;
import com.example.graduation.form.FileUForm;
import org.springframework.web.multipart.MultipartFile;

/**
 * ProjectName graduation
 *
 * @author xieyucan
 * <br>CreateDate 2022/2/26 15:40
 */
public interface FileOperationService {


    /**
     * 上传文件
     *
     * @param file
     * @return {@link boolean}
     * @author xieyucan
     * CreateDate 2022/2/26 16:11
     */
    public R upload(MultipartFile file, String token);


    /**
     * 根据文件的key来删除文件(这里主要是图片)
     *
     * @param form
     * @return {@link boolean}
     * @author xieyucan
     * CreateDate 2022/2/26 16:14
     */
    public R delete(FileDForm form);

}
